import { GTextFormat } from "../../../common/GTextFormat";
import { GlobalStyle } from "../../../common/global/GlobalStyle";
import { Language } from "../../../../extend/language/Language";
import { GTextArea } from "../../../../com/mui/controls/GTextArea";
import { FontUtil } from "../../../common/font/FontUtil";
import { ScrollPolicy } from "../../../../fl/controls/ScrollPolicy";
import { HTMLUtil } from "../../../../com/gengine/utils/HTMLUtil";
type int = number;
//class SectarianInfoPanel
    
    export  class SectarianInfoPanel /* flash.display.Sprite */
    {
        constructor(arg1: int, arg2: int)
        {
            
            this._width = arg1;
            this._height = arg2;
            mouseEnabled = false;
            this.initUI();
            return;
        }

        /* internal  */initUI(): void
        {
            this._titleTxt = new Object /* flash.text.TextField */();
            this._titleTxt.selectable = false;
            this._titleTxt.defaultTextFormat = new GTextFormat("", 12, GlobalStyle.color2Uint, true);
            this._titleTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
            this._titleTxt.text = Language.getString(20657) + "：";
            this._titleTxt.width = 100;
            this._titleTxt.height = 20;
            this._titleTxt.x = 0;
            this._titleTxt.y = 0;
            addChild(this._titleTxt);
            this._secInfoTxt = new GTextArea();
            this._secInfoTxt.styleName = "GTextArea";
            this._secInfoTxt.wordWrap = true;
            this._secInfoTxt.textField.defaultTextFormat = new GTextFormat(FontUtil.songtiName, 12, 11661311, null, null, null, null, null, flash.text.TextFormatAlign.LEFT, null, null, null, 4);
            this._secInfoTxt.textField.selectable = false;
            this._secInfoTxt.editable = false;
            this._secInfoTxt.verticalScrollPolicy = ScrollPolicy.AUTO;
            this._secInfoTxt.horizontalScrollPolicy = ScrollPolicy.OFF;
            this._secInfoTxt.x = 0;
            this._secInfoTxt.y = this._titleTxt.y + this._titleTxt.textHeight + 3;
            this._secInfoTxt.width = this._width;
            this._secInfoTxt.height = this._height - this._secInfoTxt.y + 20;
            this._secInfoTxt.htmlText = "1、xxxxxx<br>2、xxxxxx<br>3、xxxxxx<br>4、xxxxxx";
            addChild(this._secInfoTxt);
            return;
        }

        public updateData(arg1: Array<any>): void
        {
            var loc1=0;
            this.dispose();
            var loc2=arg1.length;
            while (loc1 < loc2) 
            {
                this._secInfoTxt.htmlText = this._secInfoTxt.htmlText + HTMLUtil.addColor(String(arg1[loc1]), GlobalStyle.color1);
                ++loc1;
            }
            return;
        }

        public dispose(): void
        {
            this._secInfoTxt.text = "";
            return;
        }

        public /* override */ get height(): number
        {
            return this._height;
        }

        public /* override */ get width(): number
        {
            return this._width;
        }

        /* internal */ /* var */_width: int;

        /* internal */ /* var */_height: int;

        /* internal */ /* var */_titleTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_secInfoTxt: GTextArea;
    }
